// InstructionBox.h: interface for the CInstructionBox class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_INSTRUCTIONBOX_H__0D11EAB0_90F0_11D2_807E_00A0C91F41A7__INCLUDED_)
#define AFX_INSTRUCTIONBOX_H__0D11EAB0_90F0_11D2_807E_00A0C91F41A7__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#include "8085Object.h"
#include "MyAddressListBox.h"
#include "RedRound.h"
#include "RoundRect.h"
#include "GreenTriangle.h"


typedef struct tagOneInstruction
{
    word address;
    char szMnemonic[32];
}OneInstruction;


class CInstructionBox : 
	public CMyAddressListBox
{
public:
	void AddBkPt(word addr);
	void ShowDisAssemblyPosition(word address);
	virtual void OnShowSourceLine();
	virtual void EnableDisableBkPt();
	int GetSelectedIndex();
	virtual void EnableDisableMenuItems();
	int IsABreakPt(word address);
	void Adjust(word addr=0);
	virtual int ToggleBreakPoint();
	int EnterNewInstruction();
	int MoveOnePageDown();
	int MoveOnePageUp();
	int MoveOneAddressDown();
	int MoveToEnd();
	int MoveToHome();
	int MoveOneAddressUp();
	virtual int RefreshStrings(int addr=0,BOOL bCheckModified=TRUE);
	void Init();
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
	CInstructionBox();
	virtual ~CInstructionBox();

	virtual void OnVirtualVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
	//virtual void OnVirtualLButtonDown(UINT nFlags, CPoint point);
    virtual void OnVirtualKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);

    //data members
protected:
    CGreenTriangle m_cGreenTriangle; // current IP

    // used to indicate the Disassembled address
    CGreenTriangle m_cBlueTriangle; 
    word m_nBtAddress;  // 8085 memory address where to show the Blue Triangle
    CRedRound  m_cRedRound;
private:
	virtual void EnterData();
};

#endif // !defined(AFX_INSTRUCTIONBOX_H__0D11EAB0_90F0_11D2_807E_00A0C91F41A7__INCLUDED_)
